<template>
    <div class="page-content">
        <article-content :item="currentArticle"></article-content>
    </div>

</template>

<script type="text/javascript">
    import store from '../store/index'
    import articleContent from '../components/article-content.vue'
    export default{
        components: {
            'article-content': articleContent,
        },

        mounted () {
            //触发获取文章内容action
            store.dispatch('initArticlePage')
        },

        computed: {
            //文章内容state
            currentArticle(){
                return store.getters.currentArticle
            }
        }

    }
</script>
